﻿using FluorineFx.IO;

namespace FiddlerAmfParser.OutputProcessing
{
	/// <summary>
	/// Plugin Interface for a AMF output processor.
	/// </summary>
	public interface IOutputProcessorPlugin
	{
		/// <summary>
		/// Can be used to define a rendering order.
		/// </summary>
		/// <remarks>The Default Renderer is at order-number 128.</remarks>
		byte RenderOrder { get; }

		/// <summary>
		/// Method to implement a custom processing of the whole AMF Message object.
		/// </summary>
		/// <param name="ctx">Parser Context to refer to the available UI Elements.</param>
		/// <param name="messageData">The AMF Data of the complete AMF Message.</param>
		void ProcessAmfMessage(ParserContext ctx, AMFMessage messageData);

		/// <summary>
		/// Method to implement a custom processing of a AMF Body object.
		/// </summary>
		/// <remarks>Can be called multiple times for one AMF-Message.</remarks>
		/// <param name="ctx">Parser Context to refer to the available UI Elements.</param>
		/// <param name="bodyData">The AMF Data of the current processing body.</param>
		void ProcessAmfBody(ParserContext ctx, AMFBody bodyData);
	}
}
